<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<img src="http://img1.gtimg.com/digi/pics/hv1/178/210/2086/135695878.jpg" id="img1"/>
		<script>
			var img = document.getElementById("img1");
			window.onload = function(){
				if(img.complete){
					alert(1);
				}
			}
		</script>
	</body>
</html>
